package chapter10;

/**
 * Created by lenovo on 2016/4/8.
 */
import java.util.Scanner;
public class ExamOne {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String[] ming=new String[100];
        char[] mid=new char[100];
        int[] mi=new int[100];
        int time=0;
        int i=0;

        for( i=0;true;i++){
            System.out.printf("请输入第%d 字符%n",i);
            ming[i]=scanner.next();
            if(ming[i].charAt(0)=='#') {
               break;
            }
        }
        System.out.println("输入完毕了");
        time=i;
        System.out.println("i="+time);

        for( i=0;i<time;i++){
            System.out.printf("转换第%d个字母%n",i);
            mid[i]=ming[i].charAt(0);
            mi[i]=((int)mid[i]-'a'+3)%26+'a';
            System.out.printf("转换第%d个字母成功%n",i);
        }
        System.out.println("转换完了");

        for( i=0;i<time;i++){
            System.out.printf("输出第%d个字母%n",i);
            System.out.println((char)mi[i]);
        }
    }

}
